//
//  JMViewController.m
//  oneCommonLib
//
//  Created by Cansing on 12/10/2024.
//  Copyright (c) 2024 Cansing. All rights reserved.
//

#import "JMViewController.h"
//#import "YJH_MyProgressHUD.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKitCore.h>
#import "HeaderConfig.h"
#import "LTPickerView.h"
#import "BRAddressPickerView.h"
#import "chatTestViewController.h"
#import "EHPopoverAnimator.h"
#import "OneAuthorizeCodeViewController.h"

@interface JMViewController ()<OneAuthorizeCodeViewControllerDelegate>

@end

@implementation JMViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = UIColor.yellowColor;
    // Do any additional setup after loading the view, typically from a nib.

//    BRAddressPickerView*view=[BRAddressPickerView new];
//    [view performSelector:@selector(br_addressJsonArray)];
//
//      self.view.backgroundColor = [UIColor redColor];
//
//        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//            //[YJH_MyProgressHUD dismissWithSuccess:@"camsomg"];
//        });
}

- (void)didReceiveMemoryWarning {
    //[super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
//    [self presentViewController:[chatTestViewController new] animated:YES completion:nil];
    
    OneAuthorizeCodeViewController *codeVC = [[OneAuthorizeCodeViewController alloc]init];
    codeVC.codeState = setCode;
    codeVC.codeType = chatCode;
    codeVC.delegate = self;
    
    EHPopoverAnimator *popoverAnimator = [[EHPopoverAnimator alloc]init];
    CGSize frameSize = CGSizeMake(270, 398);
    popoverAnimator.presentedFrame = CGRectMake((375-frameSize.width)*0.5, (667-frameSize.height)*0.5, frameSize.width, frameSize.height);
    [popoverAnimator presentFromViewController:self toViewController:[[UINavigationController alloc]initWithRootViewController:codeVC] isTransform3D:YES];
}
#pragma mark - OneAuthorizeCodeViewControllerDelegate
- (void)authorizeCodeViewWillDisappear{
    NSLog(@"authorizeCodeViewWillDisappear");
}
@end
